const http = require('http');
//创建web 服务器
const server = http.createServer()
//为服务器实例绑定request 事件 ，监听客户端
server.on('request', function (req, res) {
    console.log('aoligei');
    var str = `你请求的url是${req.url},你请求的方式4${req.method}`
    req.setHeader('Content-Type', 'text/html;charset=utf-8')
    res.end(str)
})
server.listen(8086, function () {
    console.log('xizhupeiqi http://127.0.0.1:8086');
})

